import {} from "react";
import { useNavigate } from "react-router-dom";
import { ProductCard } from "react-vant";

const index = (props) => {
  const navigate = useNavigate();
  const { itemData } = props;
  return (
    <ProductCard
      price={itemData.price}
      desc={itemData.title}
      title={itemData.title}
      thumb={itemData.image}
      onClick={() => navigate(`/detail/${itemData.id}`)}
    />
  );
};

export default index;
